package com.hhs.storage.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;

import java.beans.Transient;
import java.time.LocalDate;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author chx
 * @since 2024-01-22
 */

@Data
public class WorkOvertime implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 加班表id
     */

    private String id;

    /**
     * 用户id
     */
    private String userId;

    @TableField(exist = false)
    private String name;

    @TableField(exist = false)
    private String account;

    @TableField(exist = false)
    private List<BaseDepartment> department;

    /**
     * 审批状态 0-审批中 1-已审批 2-驳回
     */
    private Integer approvalStatus;

    /**
     * 审批人id
     */
    private String approvalId;

    /**
     * 审批意见
     */
    private String approvalOpinion;

    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime approvalDateTime;

    /**
     * 加班日期
     */

    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate overtimeDate;

    /**
     * 加班时长(h)
     */
    private Float overtimeHours;

    @TableField(exist = false)
    private List<WorkOvertimeTime> timeQuantum;

    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
